package com.esyoga.yoyoga.service.impl;

import com.esyoga.yoyoga.mapper.TTrainerMapper;
import com.esyoga.yoyoga.pojo.TTrainer;
import com.esyoga.yoyoga.pojo.TTrainerExample;
import com.esyoga.yoyoga.service.CoachWalletService;
import lombok.Data;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Data
@Service
public class CoachWalletServiceImpl implements CoachWalletService {

    @Resource
    TTrainerMapper tTrainerMapper;

    @Resource
    TTrainerExample tTrainerExample;

    @Override
    public List<TTrainer> showBalance(Integer tId) {
        tTrainerExample.clear();
        TTrainerExample.Criteria criteria = tTrainerExample.createCriteria();
        criteria.andTIdEqualTo(tId);
        return tTrainerMapper.selectByExample(tTrainerExample);
    }
}
